(compat) Fix incorrect usages of storage service at Runtime and Loader layer#25722
Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR fixes incorrect usages of storage service types at the Runtime and Loader layers following the introduction of IContainerStorageService and IRuntimeStorageService. The changes ensure the correct storage service interfaces are used in mock implementations and type annotations.
Key Changes
- Updated mock storage service implementations to use
IContainerStorageServiceinstead ofIRuntimeStorageService - Corrected import statements to reference the appropriate storage service types
- Removed a test that verified
getSnapshotTreeinaccessibility from data store context, which is now obsolete
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| packages/test/test-end-to-end-tests/src/test/deRehydrateContainerTests.spec.ts | Removed obsolete test case that checked storage access restrictions in detached containers |
| packages/runtime/container-runtime/src/test/containerRuntime.spec.ts | Updated mock storage service types from IRuntimeStorageService to IContainerStorageService |
| packages/loader/container-loader/src/container.ts | Corrected parameter type in initializeProtocolStateFromSnapshot from IDocumentStorageService to IContainerStorageService |
jason-ha
left a comment
There was a problem hiding this comment.
Maybe strike the last sentence of the PR description.
Also, even if we were to keep this, we would have to cast data store context's storage any or one of the storage service interfaces from upper layer which again doesn't test anything useful.
I think it just adds confusion. It is enough to say it isn't useful.
…r layer (microsoft#25722) There are a couple of incorrect usages of the storage service at the Runtime and Loader layer after `IContainerStorageService` and `IRuntimeStorageService` were added by microsoft#25057. This PR fixes them. Also, removed a test that was ensuring `getSnapshotTree` cannot be accessed from data store context. With microsoft#25057, `getSnapshotTree` is not accesible from data store context's storage anymore so this test is not needed.
There are a couple of incorrect usages of the storage service at the Runtime and Loader layer after
IContainerStorageServiceandIRuntimeStorageServicewere added by #25057. This PR fixes them.Also, removed a test that was ensuring
getSnapshotTreecannot be accessed from data store context. With #25057,getSnapshotTreeis not accesible from data store context's storage anymore so this test is not needed.